<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:aw="clr-namespace:Assergs.Windows"
	xmlns:awc="clr-namespace:Assergs.Windows.Controls"
	>
    	
    <SolidColorBrush x:Key="ForegroundBrush" Color="{x:Static aw:UnderlineSeparatorPallet.Foreground}" />	
    	
    <LinearGradientBrush x:Key="NormalUnderLineBrush" StartPoint="0,0.5" EndPoint="1,0.5">
		<GradientStop Offset="0" Color="{x:Static aw:UnderlineSeparatorPallet.NormalBrush1}" />
		<GradientStop Offset="1" Color="{x:Static aw:UnderlineSeparatorPallet.NormalBrush2}" />
		<GradientStop Offset="1" Color="{x:Static aw:UnderlineSeparatorPallet.NormalBrush3}" />
	</LinearGradientBrush>		
	
	<Style x:Key="{x:Type awc:UnderlineSeparator}" TargetType="{x:Type awc:UnderlineSeparator}" >
		<Setter Property="Focusable" Value="False" />
		<Setter Property="SnapsToDevicePixels" Value="True" />
		<Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
		<Setter Property="Template">
			<Setter.Value>

				<ControlTemplate TargetType="{x:Type awc:UnderlineSeparator}"> 
				
					<StackPanel Orientation="Vertical">
						<ContentPresenter ContentSource="Header" /> 
						<ContentPresenter ContentSource="Content" />
						<Border 
							Name="_Underline" 
							Visibility="Collapsed" 
							HorizontalAlignment="Stretch" 
							Height="{TemplateBinding UnderlineHeight}" 
							Background="{StaticResource NormalUnderLineBrush}" />
					</StackPanel>		
					
					<ControlTemplate.Triggers>
						<Trigger Property="Content" Value="{x:Null}">
							<Setter TargetName="_Underline" Property="Visibility" Value="Visible" />
						</Trigger>
					</ControlTemplate.Triggers>

				</ControlTemplate>
				
			</Setter.Value>
		</Setter>

	</Style>

</ResourceDictionary>